package homework_06.homework_04;

public class Student {
    String name;
    int no;
    int score;

    public Student() {
    }

    public Student(String name, int no, int score) {
        this.name = name;
        this.no = no;
        this.score = score;
    }



    public void sort(Student [] stud){
        for(int i=1;i<stud.length;i++){
            for(int j=0;j<stud.length-i;j++){
                if(stud[j].score<stud[j+1].score){
                    Student temp=stud[j];
                    stud[j]=stud[j+1];
                    stud[j+1]=temp;
                }
            }
        }
        for(int k=0;k<stud.length;k++){
            System.out.println(stud[k].no+"\t"+stud[k].name+"\t"+stud[k].score);
        }
    }
}
